import { baseRequest } from '@/utils/request'

const request = (url, ...arg) => baseRequest(`/biz/sitydutyrule/` + url, ...arg)

/**
 * 坐班规则Api接口管理器
 *
 * @author 罗超
 * @date  2024/01/15 15:59
 **/
export default {
	// 获取坐班规则分页
	sysSitydutyRulePage(data) {
		return request('page', data, 'get')
	},
	// 提交坐班规则表单 edit为true时为编辑，默认为新增
	sysSitydutyRuleSubmitForm(data, edit = false) {
		return request(edit ? 'edit' : 'add', data)
	},
	// 删除坐班规则
	sysSitydutyRuleDelete(data) {
		return request('delete', data)
	},
	// 获取坐班规则详情
	sysSitydutyRuleDetail(data) {
		return request('detail', data, 'get')
	},
	// 获取坐班一览
	userRoster(data) {
		return request('userRoster', data, 'get')
	}
}
